Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing constraint on annotation_metadata.annotation_id #9257

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

marcospri
Copy link
Member

To avoid locking the table for a long time, the constraint is added in two steps:

  • Add an unique index, concurrently
  • Use that index as the base for the constraint

Testing

  • Apply the migration
tox -e dev --run-command 'alembic upgrade head'
  • --autogenerate doesn't detect any missing changes now:
tox -e dev --run-command 'alembic revision --autogenerate'

To avoid locking the table for a long time, the constraint is added in two steps:

- Add an unique index, concurrently
- Use that index as the base for the constraint
@marcospri marcospri requested a review from mtomilov January 20, 2025 10:25
@marcospri marcospri merged commit eb5bc0a into main Jan 20, 2025
10 checks passed
@marcospri marcospri deleted the add-missing-contraint branch January 20, 2025 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants